import { ISpan } from '@ibiz/model-core';
import {
  IEditorContainerController,
  IEditorProvider,
} from '@ibiz-template/runtime';
import { OdooPersonalInfoEditorController } from './editor.controller';

/**
 * 编辑器适配器
 * @export
 * @class OdooPersonalInfoEditorProvider
 * @implements {EditorProvider}
 */
export class OdooPersonalInfoEditorProvider implements IEditorProvider {
  formEditor: string = 'IBizOdooPersonalInfo';

  gridEditor: string = 'IBizOdooPersonalInfo';

  async createController(
    editorModel: ISpan,
    parentController: IEditorContainerController,
  ): Promise<OdooPersonalInfoEditorController> {
    const c = new OdooPersonalInfoEditorController(
      editorModel,
      parentController,
    );
    await c.init();
    return c;
  }
}
